1. Technical Field of the Invention
The present invention relates to a decibel value calculation circuit for computing a logarithmic value y of input data x, and more particularly to a decibel value calculation circuit for computing it by separating into mantissa value a and exponent value b on the basis of expression of data x=axc2x72b.
2. Description of the Related Art
Conventionally, audio data and image data to be stored or transmitted are encoded and compressed, and a logarithm of such data is often taken to calculate a decibel value. For example, encoding compression processing of such data generally includes processing to quantize data by allotting a predetermined number of bits to it. When the number of quantized bits is allotted, a signal level is often referred to, and it is necessary to calculate the decibel value of data.
If an input data value is x and a decibel value is y, the decibel value is calculated by logarithmic calculation as follows:
y=xcex1xc2x7log10x
where, xcex1 is a constant such as 10 or 20.
Conventionally, software installed in a microcomputer is used to make such calculation.
However, such computational software has a disadvantage in that computation requires significant time. It is especially desirable for a device such as an MD (mini disc) player to have a data-processing circuit integrated into a single integrated circuit. It is desirable that the entire circuit be formed of a simple circuit and be able to calculate at a satisfactorily high speed. Therefore, it is desired that the circuit for calculation be made of hardware and have a simple configuration.
It is an object of the invention to provide a decoder which can make the above-described computation by a relatively simple small-scale circuit.
The invention processes input data x by separating it into mantissa value a and exponent value b by a separator. Thus, ROM is only used to store a table of log10a, and its size can therefore be very small. Exponent value b is multiplied with a constant nxc2x7log102 (n=integer) by a multiplier. Addition of output from the ROM and that from the multiplier by an adder can result in a calculated result y. Accordingly, a small table and single multiplication and addition are all required to be made, so that the circuit can be made simple, and high-speed arithmetic can be performed.
According to a preferred embodiment of the invention, the separator converts the data x expressed with a fixed point into data expressed with a floating point.